package com.youbang.common;

/**
 * Created by tongwen on 2017/3/24.
 */
public enum ErrorCode {
    Success(0, "成功"),
    Error(1, "对不起，操作失败"),
    WebInvalidParam(3, "输入参数格式不正确"),
    

    WlWebCommonBase(10000000, "Web通用失败码起始值"),
    WlWebServiceException(WlWebCommonBase.code + 1, "web服务发生异常"),
    WlSessionTimeout(WlWebCommonBase.code + 2, "Session超时，请重新登录"),
    WlSendHttpPostFail(WlWebCommonBase.code + 3, "发送Post请求失败"),
    WlSendHttpGetFail(WlWebCommonBase.code + 4, "发送Get请求失败"),
    WlGetAccessTokenFail(WlWebCommonBase.code + 5, "获取Access-Token失败"),

    //Web通用失败码不允许超过此值
    WlWebCommonBaseEnd(WlWebCommonBase.code + 500, "Web通用失败码结束值");


    private String msg;
    private int code;

    private ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
